Repository navigation
Compress native prebuilds with verified decoding - #1015
Closed
John-David Dalton (jdalton) wants to merge 1 commit into
Closed
John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
John-David Dalton (jdalton)
marked this pull request as ready for review
November 10, 2026 03:31
Author
|
@microsoft-github-policy-service agree |
John-David Dalton (jdalton)
force-pushed
the
feat/compressed-prebuilds
branch
from
November 10, 2026 06:19
9d23ac3 to
10f0037
Compare
Author
John-David Dalton (jdalton)
force-pushed
the
feat/compressed-prebuilds
branch
from
November 11, 2026 01:51
3d7d7db to
ce842ef
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compress
.nodeaddons to reduce the package overhead in #864. The verified rerun shows 2.51% less unpacked data and 0.78% less download data, with slower loading. Windows DLLs, executables, and debug symbols make up 95.1% of unpacked bytes and remain unchanged.This proposal keeps the existing single-package distribution. The alternative is #1016, which installs only the current platform's files; both approaches address #864 with different savings and tradeoffs.
The 61.80% addon reduction applies to only 4.16% of the package. The download is already gzip-compressed. Each chart pair uses its own zero-based scale.
Given the 0.056 MB download saving and added loading/cache work, the current compression implementation offers a limited tradeoff. Platform-specific distribution in #1016 is the more promising direction for reducing installed size.
Verified sizes and loading cost
.nodeaddons onlyThe macOS ARM64 decoded cache adds 137,384 B, reducing the net file-byte saving to 2.00% after first use. These are logical file sizes, excluding dependencies and package-manager stores. No startup speedup is claimed.
The rerun used a fresh
node-pty@1.2.0-beta.18download verified against npm's SHA-512 integrity. Repacking the baseline reproduced that archive exactly. Unrelated packed files retain identical sizes and hashes. Size results match the previous run exactly.Timings are medians of 21 fresh processes per mode on macOS ARM64 / Node 26.12.0. Every process also spawned a real PTY. Node startup and PTY spawning are excluded from load timings; OS caches were not flushed. Linux and Windows startup remain unmeasured.
Raw measurements and file inventories.
Implementation and validation
Design and reproduction.